﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DelegatesExample
{
    class Program
    {
        static void Main(string[] args)
        {
            PhotoProcessor processor = new PhotoProcessor();
            PhotoFilters filters = new PhotoFilters();
            //PhotoProcessor.FilterMethod filterMethods = filters.ApplyBrightnessFilter;
            Action<Photo> filterMethods = filters.ApplyBrightnessFilter;
            filterMethods += filters.ApplyColorFilter;
            filterMethods += ApplyMyCustomFilter;
            filterMethods -= filters.ApplyColorFilter;

            processor.Process("MyPhoto.jpg", filterMethods);
        }

        static void ApplyMyCustomFilter(Photo photo)
        {
            Console.WriteLine("Use My Custom Filter");
        }

        //List<IPhotoFilter> filters = new List<IPhotoFilter>
            //{
            //    new BrightnessFilter(),
            //    new MyPhotoFilter()
            //};

            //processor.Process("MyPhoto.jpg", filters);
        //}
    }

    //class MyPhotoFilter : IPhotoFilter
    //{
    //    public void Apply(Photo photo)
    //    {
    //        Console.WriteLine("Do some shit with this photo");
    //    }
    //}
}
